<div>Current location: <span id="current-location"></span></div>
<span class="buttonset">
  <button class="button" onclick="loadFileList(current_path)">Reflesh</button>
  <button class="button" onclick="loadFileList('{{parent}}');">Parent Directory</button>
</span>
<div id="fileList">
  <div>
    <input type="text" name="{{href}}-new-folder" value="New Folder"/>
    <button class="button" name="test" onclick="mkcol(current_path, $(this).prev().val());">New Folder</button>
  </div>
  <div></div>
  {% if fileList %}
  {% for iscol, href, props in fileList %}
  <div>
    <span>
      {% if iscol %}
      <a name="{{href}}-displayname" href="#" onclick="loadFileList('{{href}}')">{{ props.displayname.displayname }}</a>
      {% else %}
      <a name="{{href}}-displayname" href="{{href}}">{{ props.displayname.displayname }}</a>
      {% endif %}
    </span>
    <span class="buttonset">
      <button class="button" onclick="deleteIt('{{href}}')">Delete</button>
      <button class="button" onclick="$(this).trigger('expand')">Detail</button>
    </span>
  </div>
  <div>
    <div class="tabs-ajax">
      <ul>
	<li><a href="{{href}}?action=properties">Property</a></li>
	<li><a href="{{href}}?action=acl">ACL</a></li>
      </ul>
    </div>
  </div>
  {% endfor %}
  {% else %}
  <div><a>Empty</a></div>
  <div></div>
  {% endif %}
</div>
<script type="text/javascript">
  $("#current-location").text(current_path);
  $(".button").button();
  $(".buttonset").buttonset();
</script>
